Input/output buffer for protecting a circuit from signals received from external devices

ABSTRACT

An input/output buffer that protects a circuit from voltage signals provided from an external device. The input/output buffer includes a reference power generation circuit connected to a high voltage power supply and a low voltage power supply to convert the voltage of an external voltage signal and generate reference power. The reference power generation circuit has a protection circuit including a plurality of MOS transistors for decreasing the voltage of the external voltage signal to a predetermined voltage when the input/output buffer is not supplied with the voltage of the high voltage power supply. Each of the MOS transistors has a back gate connected to a predetermined node at which the voltage is less than the voltage of the high voltage power supply and greater than the voltage of the low voltage power supply.

CROSS-REFERENCE TO RELATED APPLICATION

This is a Division of application Ser. No. 10/368,409 filed Feb. 20,2003, which is now U.S. Pat. No. 6,924,673. The disclosure of the priorapplication is hereby incorporated by reference herein in its entirety.

This application is based upon and claims the benefit of priority ofJapanese Patent Applications No. 2002-159696, filed on May 31, 2002, thecontents being incorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to an input/output buffer, an inputbuffer, and an output buffer.

Due to the recent progress in multimedia and the popularity ofasymmetric digital subscriber line (ADSL) and wireless LAN, the numberof households having personal computers (PC) has increased. It isrequired that the power consumption be reduced in peripheral equipmentof a personal computer. Thus, the circuits of the peripheral equipmentare miniaturized and operated with low voltage. Such low voltagecircuits must be protected when the circuits are not supplied with poweror when the low voltage circuits are provided with a voltage signal thatis greater than the operational voltage.

A PC is normally connected to a display, a mouse, a printer, a memory, amodem, or a game device by means of a bus or an input/output port (I/Oport).

A bus is classified as an internal bus or an external bus. The internalbus connects the CPU and the memory. The external bus connects the CPUand an I/O port (e.g., graphic board or SCSI board). Examples of anexternal bus include, for example, industrial standard architecture(ISA), peripheral component interconnect (PCI), small computer systeminterface (SCSI), IEEE 1394, universal serial bus (USB), integrateddrive electronics (IDE), and AT attachment (ATA).

The I/O port is an interface connecting the PC and the peripheralequipment and normally includes a port exclusive connector. The I/O portincludes a serial port connected to, for example, a mouse and modem, aparallel port connected to a printer, and a game port connected to agame device.

FIG. 1 is an explanatory diagram illustrating a layout example ofconnection pins in a game port (joystick port), which is connected to ajoystick. A joystick port connector 71, which includes +5 V (volts)power supply terminals, digital input terminals, analog input terminal,and ground terminals, may be connected to joysticks A and B. An examplein which the joysticks A and B each have two buttons will now bediscussed.

The +5 power terminals are normally directly connected to a motherboard,and current flows through the +5 power supply terminals to themotherboard. Digital signals (A1, A2, A3, A4 in FIG. 1) are input fromthe buttons of the joysticks A and B, which are connected to the port.The digital input terminals receive, for example, a signal having a lowlevel (V) when the buttons of the joysticks A and B are pushed and asignal having a high level when the buttons of the joysticks A and B arenot pushed.

The analog input terminals receive an analog signal (AX, AY, BX, BY)that is in accordance with the resistances of the joysticks A and B.

More specifically, the joystick port includes a one shot multivibrator72 as shown in FIG. 2, which is connected to an analog input terminalvia an input/output buffer 73. A resistor 74 having a resistance of, forexample, 2.2 kΩ is connected between the analog input terminals and themultivibrator 72. A 0.011 μF timing capacitor 75 is connected betweenthe output terminal of the multivibrator 72 and a ground terminal. Thejoysticks A and B each have a variable resistor 76 (0 to 100 kΩ). Theresistor 76 has a first terminal connected to a +5 power supply terminaland a second terminal connected to the analog input terminal.

When the analog input terminal is provided with an analog signal fromthe joysticks A and B, the multivibrator 72 generates an output signalhaving a high level (5 V). The high output signal charges the capacitor75. When the voltage of the capacitor 75 reaches 3.3 V, themultivibrator 72 generates a signal at a low level (0 V). When themultivibrator 72 is outputting the high signal, the resistance of thejoysticks A and B is proportional to the resistance of the variableresistors 76. In other words, position information of the joysticks Aand B may be detected from the resistance of the variable resistor 76.

Due to the decrease in the operational voltage of the interface (I/Oport), the circuits used in peripheral equipment are not operated underthe same power supply voltage. Thus, an input/output buffer for the I/Oport must be able to accept signals having a voltage that is greaterthan the operational voltage of the input/output buffer.

For example, when the power supply voltage of the input/output buffer 73is 3.3 V, a 5 V voltage signal for operating the joysticks A and B isinput to the input terminal of the input/output buffer 73. In this case,the input/output buffer 73 must be able to accept a 5 V voltage signal.

The following input/output buffers are known to be able to acceptsignals having a voltage that is greater than the power supply voltage:

first prior art example, input/output buffer having a tolerant function;and

second prior art example, input/output buffer having a voltageresistance function at a circuit section to which a voltage signal,which is greater than the operational voltage, is applied in theinput/output buffer.

FIG. 3 is a schematic block diagram of an input/output buffer 81according to the first prior art example. The input/output buffer 81includes an input/output circuit 82, an input circuit 83, an outputcircuit 84, and a tolerant circuit 85.

The input/output circuit 82 sends a voltage signal EB, which is anexternal input signal, to the input circuit 83 and the tolerant circuit85. The tolerant circuit 85 generates a voltage signal BP having avoltage that is in accordance with the input voltage signal EB. Theinput circuit 83 generates a signal X by adjusting the voltage signal EB(external input signal) to an optimal signal X and outputting the signalX to an internal circuit (not shown).

The output circuit 84 receives a data signal A and an output controlsignal C from the internal circuit. The output circuit 84 generatescontrol signals AP and AN in accordance with an output control signal Cand provides the control signals AP and AN to the input/output circuit82. The input/output circuit 82 generates the voltage signal EB inresponse to the control signals AP and AN and sends the voltage signalEB to the external equipment.

The circuits of the input/output buffer 81 will be described in moredetail. The output circuit is a generally used circuit and thus will notbe discussed.

FIG. 4 is a circuit diagram of the input/output circuit 82. Theinput/output circuit 82 includes p-channel MOS transistors (PMOStransistors) Pt1 and Pt2 and n-channel MOS transistors (NMOStransistors) Nt1 and Nt2.

The transistors Pt1 and Pt2 are connected in series, and the source ofthe transistor Pt1 is connected to a first high voltage power supplyVDE. The gate of the transistor Pt1 receives the control signal AP fromthe output circuit 84. The drain of the transistor Pt1 is connected tothe source of the transistor Pt2. The gate of the transistor Pt2 isconnected to a low voltage power supply VSS, and the drain of thetransistor Pt2 is connected to the drain of the transistor Nt1.

The back gates of the transistor Pt1 and the transistor Pt2 are eachconnected to the output of the tolerant circuit 85 and has substantiallythe same voltage as the voltage signal BP, which is generated by thetolerant circuit 85.

The transistors Nt1 and Nt2 are connected in series, and the source ofthe transistor Nt2 is connected to the low voltage power supply VSS. Thedrains of the transistors PT2, Nt1 are connected to each other, and anode N1 between the transistors Pt2 and Nt1 is connected to aninput/output terminal 82 a of the voltage signal EB. A first highvoltage power supply VDE is a power supply for supplying an externalcircuit that is connected to the input/output buffer 81 with operationalvoltage and has, for example, a voltage of 3.3 V. The low voltage powersupply VSS is the ground (GND).

The gate of the transistor Nt1 is connected to the first high voltagepower supply VDE, and the back gate of the transistor Nt1 is connectedto the low voltage power supply VSS. The gate of the transistor Bt2receives the control signal AN from the output circuit 84, and the backgate of the transistor Nt2 is connected to the low voltage power supplyVSS.

FIG. 5 is a circuit diagram of the tolerant circuit 85. The tolerantcircuit 85 includes a resistor R1 and PMOS transistors Pt3 to Pt5.

The resistor R1, which is an input protection circuit, has one endconnected to the node N1 (input/output circuit 82) of the input/outputcircuit 82 and another end connected to the gate of the transistor Pt3.The resistor R1 decreases the voltage of the voltage signal EB, which isinput to the input/output circuit as an external input signal). Thevoltage signal EB of which voltage has been decreased (voltage signalEBR) is provided to the gate of the transistor Pt3.

The source of the transistor Pt3 is connected to the first high voltagepower supply VDE, and the drain of the transistor Pt3 is connected tothe source of the transistor Pt4. The transistors Pt4 and Pt5 areconnected in series and have gates that are connected to the first highvoltage power supply VDE. The drain of the transistor Pt5 is connectedto a node N2 between the resistor R1 and the transistor Pt3. The drainof the transistor Pt5 is provided with the gate voltage of thetransistor Pt3 (voltage signal EBR).

The back gates of the transistors Pt3 to Pt5 are connected to the backgates of the other transistors and to a node between the transistors Pt3and Pt4. The tolerant circuit 85 outputs the voltage signal BP, thevoltage of which is the same as the voltage at the node between thetransistors Pt3 and Pt4.

FIG. 6 is a circuit diagram of the input circuit 83. The input circuit83 includes PMOS transistors Pt6 to Pt8 and NMOS transistors Nt3 to Nt7.The drain of the transistor Nt3 is connected to the first high voltagepower supply VDE, and the source and gate of the transistor Nt3 areconnected to each other. The transistors Nt4 and Nt5 are connected inseries, and the gates of the transistors Nt4 and Nt5 are connected tothe first high voltage power supply VDE. The source of the transistorNt5 is connected to the node N2 of the tolerant circuit 85 and receivesthe gate voltage of the transistor Pt3 (voltage signal EBR). The drainof the transistor Nt4 is connected to the source of the transistor Nt3,and the voltage at node N3 between the transistors Nt4 and Nt3 issupplied to the gates of the transistors Pt7 and Nt6. The back gates ofthe transistors Nt3 to Nt5 are each connected to the low voltage powersupply VSS.

The source of the transistor Pt6 is connected to the first high voltagepower supply VDE, and the gate of the transistor Pt6 is connected to thenode N2 of the tolerant circuit 85 to receive the voltage signal EBR.The drain of the transistor Pt6 is connected to the source of thetransistor Pt7, and the transistor Pt7 is connected to the transistorNt6. The source of the transistor Nt6 is connected to the low voltagepower supply VSS. The back gates of the transistors Pt6 and Pt7 areconnected to the output of the tolerant circuit 85 and have about thesame voltage as the voltage signal BP. The back gate of the transistorNt6 is connected to the low voltage power supply VSS.

The gates of the transistors Pt8 and Nt7 are connected to the drains ofthe transistors Pt7 and Nt6. The source of the transistor Pt8 isconnected to a second high voltage power supply VDI, and the drain ofthe transistor Pt8 is connected to the drain of the transistor Nt7. Thesource of the transistor Nt7 is connected to the low voltage powersupply VSS. The second high voltage power supply VDI is a power supplyfor supplying the internal circuit with operational voltage and has, forexample, 1.8V. The back gate of the transistor Pt8 is connected to thesecond high voltage power supply VDI, and the back gate of thetransistor Nt7 is connected to the low voltage power supply VSS. Thesignal X, which has the drain voltage of the transistors Pt8 and Nt7, isprovided to the internal circuit (not shown).

An example in which the voltage signal EB (external input signal) isinput to the input/output buffer 81 will now be discussed.

1. Case in which the voltage signal EB is close to the voltage of thelow voltage power supply VSS:

In this case, the transistor Pt3 switches on in the tolerant circuit 85.Accordingly, the tolerant circuit 85 outputs the voltage signal BP, thevoltage of which is the same as the first high voltage power supply VDE.

In the input circuit 83, the transistor Pt6 switches on and the sourceof the transistor Pt7 is connected to the first high voltage powersupply VDE. In this state, the power supply VDE activates thetransistors Nt4 and Nt5, and the transistor Nt3 is inactivated. Thisinputs the voltage signal EBR to the gates of the transistors, which inturn, activates the transistor Pt7 and inactivates the transistor Nt6.As a result, the gates of the transistors Pt8 and Nt7 are connected tothe high voltage power supply VDE. This inactivates the transistor Pt8and activates the transistor Nt7. Accordingly, the input circuit outputsthe signal X, which has the voltage of the low voltage power supply VSS,that is, a low level.

2. Case in which the voltage signal EB is close to the voltage of thehigh voltage power supply VDE (under the condition that EB<VDE issatisfied):

In this case, in the tolerant circuit 85, it is difficult for thetransistors Pt3 to Pt5 to switch on, and the transistors Pt3 to Pt5substantially function as a series-connected resistor. Accordingly, thetolerant circuit 85 outputs the voltage signal EBR, or the voltagesignal BP that has about the same voltage as the first high voltagepower supply VDE.

In the input circuit 83, the transistor Pt6 switches off. In this state,although it is difficult for the transistors Nt3 to Nt5 to switch onsince the gate-source voltage is small, a voltage signal having avoltage that is slightly lower than that of the high voltage powersupply VED (e.g., the voltage signal being about 3.1 V when the highvoltage power supply VDE has 3.3 V) is input to the gates of thetransistors Pt7 and Nt6. In response to the voltage signal, thetransistor Pt7 switches on and the transistor Nt6 switches on. As aresult, the low voltage power supply VSS is connected to the gates ofthe transistors Pt8 and Nt7. This activates the transistor Pt8 andinactivates the transistor Nt7. Accordingly, the input circuit 83outputs the voltage of the second high voltage power supply VDI, or thesignal X at a high level.

3. Case in which the voltage signal EB exceeds the first high voltagepower supply VDE:

In this case, in the tolerant circuit 85, the transistor Pt5 switches onsince its source voltage (voltage signal EBR) is greater than the gatevoltage (high voltage power supply VDE). In this state, the transistorPt4 switches on in the same manner. Accordingly, the tolerant circuit 85outputs the voltage signal BP, the voltage of which is about the same asthat of the voltage signal EB.

In the input circuit 83, the transistor Pt6 is inactivated. In thisstate, the transistor Nt4 switches off since its source voltage (voltagesignal EBR) is greater than the gate voltage (high voltage power supplyVDE). In the same manner, the transistor Nt5 switches off. However, thegate voltage of the transistor Nt3 increases and activates thetransistor Nt3. In this state, the gates of the transistors Pt7 and Nt6are provided with the voltage signal, the voltage of which is decreasedfrom that of the first high voltage power supply VDE by the thresholdvoltage of the transistor Nt3. In response to the voltage signal, thetransistor Pt7 switches off, and the transistor Nt6 switches on. As aresult, the gates of the transistors Pt8 and Nt7 are connected to thelow voltage power supply VSS. This activates the transistor Pt8 andinactivates the transistor Nt7. Accordingly, the input circuit 83outputs the voltage of the second high voltage power supply VDI, or thesignal X at a high level.

The back gates of the transistors Pt6 and Pt7 have the same voltage asthat of the voltage signal (voltage adjusted in accordance with thevoltage signal EB). Thus, even if the voltage of the voltage signal EBis greater than that of the first high voltage power supply VDE, thegate voltage becomes greater than the back gate voltage and prevents thegeneration of a leak current in the transistors Pt6 and Pt7.Accordingly, the input/output buffer 81 adjusts the voltage signal EB toa proper voltage (the operational voltage of the internal circuit) andoutputs the voltage signal EB even if an external input signal havingthe voltage signal EB (e.g., 5 V), which is greater than the operationalvoltage (3.3 V), is input to the input/output buffer 81.

When the first high voltage power supply VDE does not supply theinput/output buffer 81 with power (inactivated state), devices may bedamaged and a leakage current may flow in the input/output buffer 81.Normally, in a personal computer or the like, a power supply circuit iscontinuously supplied with power. In this state, a voltage signal may beinput to the inactivated input/output buffer 81 from an externalcircuit. In such a case, the application of a voltage greater than thepower supply voltage may damage devices or produce leakage current.

More specifically, if the high voltage signal EB is input to theinput/output buffer from an external device when the input/output buffer81 is not supplied with power (high voltage power supply VDE), voltagegreater than that of the power supply VDE is applied between the gateand drain of the transistor Pt2 and the gate and source of thetransistors Nt1, Pt3, Pt5, Pt6, and Nt5. In such a case, high voltage,which is greater than the operational voltage, is applied to the gateoxidization film of each transistor. This produces short circuitsbetween gates and drains and between gates and sources. Thus, theinput/output buffer 81 is not suitable for equipment having a hot plugfunction.

In the input/output buffer having a voltage resistance function at thepredetermined circuit sections, the gate oxidation film that directlyreceives the high voltage signal must be formed thickly while the gateoxidization films of the other transistors are formed with the normalthickness. This increases the circuit cost and increases the processingtime.

To solve the above problem, Japanese Laid-Open Patent Publication No.2000-29551 uses a buffer protection circuit, which will now bediscussed.

FIG. 7 is a circuit diagram of a prior art voltage generator 91, whichis a buffer protection circuit. The voltage generator 91 includes PMOStransistors 92 to 94 and NMOS transistors 95 to 97. The source of thetransistor 92 and the gate of the transistor 95 are connected to a powersupply VDD. The drain of the transistor 95 is connected to the gate ofthe transistor 92, and the source of the transistor 95 is connected to apower supply VSS (ground). Two diode-connected transistors 96 and 97 areconnected in series between the drain of the transistor 92 and aterminal PAD.

When the power supply voltage VDD exists, the voltage generator 91generates the reference voltage VDD2 having about the same voltage asthe power supply voltage VDD. When the power supply voltage VDD does notexist, the voltage generator 91 drops the voltage of the voltage signalinput to the terminal PAD by a voltage corresponding to two diodes. Thevoltage generator 91 adjusts the voltage signal input to the terminalPAD to a proper voltage and generates reference voltage VDD2. Thisprotects circuits from high voltage signals input to the terminal PADregardless of whether or not the power supply VDD exists.

However, the voltage generator 91 (FIG. 7) has the shortcomingsdescribed below.

(1) The back gates of the transistors are connected to the power supplyVSS (ground). Thus, when the power supply VDD does not exist (VDD=0),high voltage is applied between the gate and back gate of each of thetransistors 96 and 97. This causes device deterioration. Such ashortcoming also occurs when the transistors 96 and 97 are PMOStransistors.

(2) To sufficiently control the voltage drop in the diode-connectedtransistors 96 and 97, the transistor 94 configures a DC path betweenthe terminal and the power supply VSS. However, in the DC path, thevoltage of the power supply VDD decreases to about the same voltage asthe power supply VSS. Further, when the transistor 94 is activated, thereference voltage VDD2 decreases. Thus, the reference voltage VDD2having the intended voltage level cannot be generated. When an NMOStransistor configures the transistor 94 and the power supply VSSconfigures the gate input of the transistor 94, the path through whichcurrent flows is eliminated. As a result, the high voltage signal inputto the terminal PAD cannot be decreased to the proper voltage togenerate the reference voltage VDD2.

(3) The forward direction of the diode configured by the transistors 96and 97 is the direction from node A to the terminal PAD. Thus, when thevoltage at node A becomes greater than that at the terminal PAD (e.g.,if the voltage of the voltage signal provided to the terminal PAD is thesame as the voltage of the power supply voltage (ground)), current flowsfrom the node A to the terminal PAD. This decreases the referencevoltage VDD2 and the reference voltage VDD2 cannot be generated with theintended voltage level. If a high voltage signal is input to theterminal PAD when PMOS transistors configure the transistors 96 and 97,the effect of junction temperature increases the resistance of each PMOStransistor. This increases the difference between the voltages appliedto each PMOS transistor and damages the device.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide an input/outputbuffer, an input buffer, and an output buffer that protect circuits fromvoltage signals provided by an external device regardless of whetherpower is being supplied.

To achieve the above object, the present invention provides aninput/output buffer for use with a high voltage power supply and a lowvoltage power supply and receiving an external voltage signal. Theinput/output buffer includes a reference power generation circuitconnectable to the high voltage power supply and the low voltage powersupply for converting the voltage of the external voltage signal andgenerating reference power. The reference power generation circuithaving a protection circuit including a plurality of MOS transistors fordecreasing the voltage of the external voltage signal to a predeterminedvoltage when the input/output buffer receives the external voltagesignal and is not supplied with the voltage of the high voltage powersupply. Each of the MOS transistors has a back gate connected to apredetermined node at which the voltage is less than the voltage of thehigh voltage power supply and greater than the voltage of the lowvoltage power supply.

A further aspect of the present invention is an input/output buffer forreceiving an external voltage signal via a resistor and a referencevoltage signal. The input/output buffer having an input circuitincluding an n-channel MOS transistor and a comparator connected to then-channel MOS transistor. The n-channel MOS transistor includes a sourcefor receiving the external voltage signal via the resistor, a gateconnected to the source, and a drain for receiving reference power, thevoltage of which is divided by a divisional resistor. The comparatorcompares the external voltage signal with the reference voltage signalto determine whether the voltage of the external voltage signal isgreater than a predetermined threshold voltage from the comparison.

A further aspect of the present invention is a method for protecting aninput/output buffer from a voltage signal that is provided from anexternal device. The input/output buffer is connected to a high voltagepower supply and a low voltage power supply and includes an input/outputcircuit for transferring data with the external device. The methodincluding decreasing the voltage of the voltage signal to apredetermined voltage with a plurality of MOS transistors, which areconnected in series between the high voltage power supply and the lowvoltage power supply. Each MOS transistor has a back gate to generatereference power when the input/output buffer is not supplied with thevoltage of the high voltage power supply. The method further includessupplying the input/output circuit with the reference power, andsupplying the back gate of each MOS transistor with voltage that is lessthan the voltage of the high voltage power supply and greater than thevoltage of the low voltage power supply.

A further aspect of the present invention is an input buffer for usewith a high voltage power supply and a low voltage power supply and forreceiving an external voltage signal. The input buffer includes areference power generation circuit connectable to the high voltage powersupply and the low voltage power supply for converting the voltage ofthe external voltage signal and generating reference power. Thereference power generation circuit having a protection circuit includinga plurality of MOS transistors for decreasing the voltage of theexternal voltage signal to a predetermined voltage when the externalvoltage signal is received and the voltage of the high voltage powersupply is not supplied. Each of the MOS transistors has a back gateconnected to a predetermined node at which the voltage is less than thevoltage of the high voltage power supply and greater than the voltage ofthe low voltage power supply.

A further aspect of the present invention is an input buffer forreceiving an external voltage signal via a resistor and a referencevoltage signal. The input buffer has an input circuit including ann-channel MOS transistor and a comparator connected to the n-channel MOStransistor. The n-channel MOS transistor includes a source for receivingthe external voltage signal via the resistor, a gate connected to thesource, and a drain for receiving reference power, the voltage of whichis divided by a divisional resistor. The comparator compares theexternal voltage signal with the reference voltage signal to determinewhether the voltage of the external voltage signal is greater than apredetermined threshold voltage from the comparison.

A further aspect of the present invention is an output buffer for usewith a high voltage power supply and a low voltage power supply andreceiving an external voltage signal. The output buffer includes areference power generation circuit connectable to the high voltage powersupply and the low voltage power supply for converting the voltage ofthe external voltage signal and generating reference power. Thereference power generation circuit has a protection circuit including aplurality of MOS transistors for decreasing the voltage of the externalvoltage signal to a predetermined voltage when the output bufferreceives the external voltage signal and is not supplied with thevoltage of the high voltage power supply. Each of the MOS transistorshas a back gate connected to a predetermined node at which the voltageis less than the voltage of the high voltage power supply and greaterthan the voltage of the low voltage power supply.

Other aspects and advantages of the present invention will becomeapparent from the following description, taken in conjunction with theaccompanying drawings, illustrating by way of example the principles ofthe invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention, together with objects and advantages thereof, may best beunderstood by reference to the following description of the presentlypreferred embodiments together with the accompanying drawings in which:

FIG. 1 is an explanatory diagram illustrating connection pins of ajoystick port in the prior art;

FIG. 2 is an explanatory diagram illustrating an analog input of ajoystick port;

FIG. 3 is a schematic block diagram of a prior art input/output buffer;

FIG. 4 is a circuit diagram illustrating an input/output buffer of FIG.3;

FIG. 5 is a circuit diagram illustrating a tolerant circuit of theinput/output buffer of FIG. 3;

FIG. 6 is a circuit diagram illustrating an input circuit of theinput/output buffer of FIG. 3;

FIG. 7 is a circuit diagram of a prior art voltage generator;

FIG. 8 is a schematic block diagram illustrating an input/output bufferaccording to a first embodiment of the present invention;

FIG. 9 is a circuit diagram illustrating an input/output circuit of theinput/output buffer of FIG. 8;

FIG. 10 is a circuit diagram illustrating a tolerant circuit of theinput/output buffer of FIG. 8;

FIG. 11 is a circuit diagram illustrating an input circuit of theinput/output buffer of FIG. 8;

FIG. 12 is a circuit diagram illustrating a power generation circuit ofthe input/output buffer of FIG. 8;

FIG. 13 is an explanatory diagram illustrating a protection circuit ofthe power generation circuit of FIG. 12;

FIG. 14 is an explanatory diagram illustrating an operation example ofthe power generation circuit of FIG. 12;

FIG. 15 is an explanatory diagram illustrating a further example of aprotection circuit;

FIGS. 16A and 16B are explanatory diagrams illustrating further examplesof a protection circuit;

FIG. 17 is a circuit diagram illustrating an input/output circuitaccording to a second embodiment of the present invention;

FIGS. 18A and 18B are circuit diagrams illustrating input circuits ofthe second embodiment;

FIG. 19 is a schematic block diagram illustrating an input bufferaccording to a third embodiment of the present invention;

FIG. 20 is a schematic block diagram illustrating an output buffer ofthe third embodiment;

FIGS. 21A to 21C are explanatory diagrams illustrating a pull-up inputbuffer according to a fourth embodiment of the present invention;

FIGS. 22A and 22B are explanatory diagrams illustrating the input bufferof FIGS. 21A to 21C provided with a fail-safe function;

FIGS. 23A and 23B are explanatory diagrams illustrating the pull-upinput buffer of the fourth embodiment;

FIGS. 24A and 24B are explanatory diagrams illustrating the input bufferof FIGS. 23A and 23B provided with a fail-safe function; and

FIG. 25A and 25B are explanatory diagrams of the input/output circuit ofthe first embodiment provided with a fail-safe function.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the drawings, like numerals are used for like elements throughout.

FIG. 8 is a schematic block diagram of an input/output buffer 11according to a first embodiment of the present invention. Theinput/output buffer 11 includes an input/output circuit 12, an inputcircuit 13, an output circuit 14, a tolerant circuit 15, and a powergeneration circuit (reference power generation circuit) 16.

The input/output circuit 12 provides a voltage signal EB, which is anexternal input signal EB, to the input circuit 13, the tolerant circuit15, and the power generation circuit 16. In accordance with the voltageof the voltage signal EB, the power generation circuit 16 generatesoperational power (reference power) VDO for the input/output buffer 11.The power generation circuit 16 provides the reference power VDO to theinput/output circuit 12, the input circuit 13, and the tolerant circuit15. The tolerant circuit 15 generates a voltage signal BP, the voltageof which corresponds with the input voltage signal EB. In accordancewith the reference power VDO, the input circuit 13 adjusts the voltagesignal EB to a proper voltage to generate a signal X and outputs thesignal X to an internal circuit (not shown).

When the output circuit 14 receives a data signal A and an outputcontrol signal C from the internal circuit, the output circuit 14generates control signals AP and AN in accordance with an output controlsignal C. The control signals AP and AN are provided to the input/outputcircuit 12. In response to the control signals AP and AN, theinput/output circuit 12 generates the voltage signal EB and outputs thevoltage signal EB (output signal).

The configuration of each circuit in the input/output buffer 11 will nowbe discussed in detail. The output circuit 14 is a widely used circuitand thus will not be discussed.

FIG. 9 is a circuit diagram of the input/output circuit 12. Theinput/output circuit 12 includes PMOS transistors Pt1 and Pt2 and NMOStransistors Nt1 and Nt2. In the input/output circuit 12, the source ofthe transistor Pt1 and the gate of the transistor Nt1 are supplied withthe reference power VDO. The remaining parts of the input/output circuit12 are the same as those of the input/output circuit 82 illustrated inFIG. 4.

FIG. 10 is a circuit diagram of the tolerant circuit 15. The tolerantcircuit 15 includes a resistor R1, which is a protection resistor, andPMOS transistors Pt3 to Pt5. In the tolerant circuit 15, the source ofthe transistor Pt3 and the gates of the transistors Pt4 and Pt5 aresupplied with the reference power supply VDO. The remaining parts of thetolerant circuit 15 are the same as those of the tolerant circuit 85illustrated in FIG. 5.

FIG. 11 is a circuit diagram of the input circuit 13. The input circuit13 includes PMOS transistors Pt6 to Pt8 and NMOS transistors Nt3 to Nt7.In the input circuit 13, the source of the transistor Pt6, the drain ofthe transistor Nt3, and the gates of the transistors Nt4 and Nt5 aresupplied with the reference power VDO. The remaining parts of the inputcircuit 13 are the same as those of the input circuit 83 illustrated inFIG. 6.

FIG. 12 is a circuit diagram of the power generation circuit 16. Thepower generation circuit 16 includes PMOS transistors Pt9 to Pt15, NMOStransistors Nt8 to Nt12, and a resistor R2.

The gates of the transistors Nt8 and Pt9 and the source of thetransistor Pt10 is connected to a high voltage power supply VDE (e.g.,3.3 V). The source of the transistor Nt8 is connected to a low voltagepower supply VSS (ground), and the drain of the transistor Nt8 isconnected to the source of the transistor Pt9 and the gate of thetransistor Pt10. The back gate of the transistor Nt8 is connected to thelow voltage power supply VSS. The back gates of the transistors Pt9 andPt10 are connected to the output of the tolerant circuit 15 and haveabout the same voltage as the voltage signal BP.

The transistors Pt11 to Pt14 are connected in series to the drain of thetransistor Pt9. The transistor Pt15 is connected to the transistor Pt14so that the transistors Pt11 to Pt14 are connected in a reversedirection. The voltage signal EB is input to the drain of the transistorPt15 via the resistor R2, which is used for electrostatic discharge(ESD) protection.

The transistors Nt9 to Nt12 (voltage-maintaining circuit 18) areconnected in series. The gate of each of the transistors Nt9 to Nt12 isconnected to the associated drain, and the back gate of each of thetransistors Nt9 to Nt12 is connected to the low voltage power supplyVSS. The source of the transistor Nt12 is connected to the low voltagepower supply VSS. The drain of the transistor Nt9 is connected to thesource of the transistor Pt10 and the source of the transistor Pt11. Thepower generation circuit 16 outputs the reference power VDO, the voltageof which is the same as the voltage at node N4.

In the power generation circuit 16, the transistors Pt11 to Pt15, whichare diode-connected, function as a protection circuit 17.

FIG. 13 is an explanatory diagram illustrating the transistorconfiguration in the protection circuit 17. As shown in FIG. 13, thetransistors Pt11 to Pt15 are PMOS transistors formed on, for example, ap-type silicon substrate. The back gate of each of the transistors Pt11to Pt14 is connected to the associated drain, and the back gate of thetransistor Pt15 is connected to the source of the transistor Pt15.

The transistors Pt11 to Pt14 receive the reference power VDO in theforward direction (PN). The transistor Pt15 receives the reference powerVDO in the reverse direction. That is, the transistors Pt11 to Pt15 arediode-connected to receive the reference power VDO in the manner ofPN-PN-PN-PN-NP.

The operation of the input/output buffer 11 of the first embodiment willnow be discussed with reference to FIG. 14. FIG. 14 is an explanatorydiagram illustrating an operation example of the power generationcircuit 16.

A case in which the input/output buffer 11 is supplied with power (highvoltage power supply VDE=3.3 V) will first be discussed. In this case,in the power generation circuit 16, the transistor Nt8 switches on andconnects the gate of the transistor Pt10 to the low voltage power supplyVSS. This activates the transistor Pt10. In this state, referring toFIG. 14, the power generation circuit 16 generates the reference powerVDO, the voltage of which is the same as the high voltage power supplyVDE, regardless of the voltage of the voltage signal (external inputsignal) EB. Even when the voltage signal EB, the voltage (e.g., 6 V) ofwhich is greater than the high voltage power supply VDE, is input, thetransistors Nt11 to Nt15 decreases the voltage of the voltage signal EBto the voltage of the high voltage power supply VDE (3.3 V). Thus, thereference power VDO is output at about 3.3 V.

A case in which the input/output buffer 11 is not supplied with power(i.e., the high voltage power supply VDE being substantially 0 V) willnow be discussed.

In this case, the transistor Nt8 switches off and the transistor Pt9switches on in the power generation circuit 16. In this state, thetransistor Pt10 switches off and the power generation circuit 16generates the reference power VDO, the voltage of which is in accordancewith the voltage signal EB, as shown in FIG. 14.

More specifically, when the input voltage signal EB, has a voltage thatis substantially the same as the low voltage power supply VSS, thevoltage of the reference power VDO becomes the same as that of the lowvoltage power supply VSS (0 V). When the input voltage signal EB has avoltage that is substantially the same as the high voltage power supplyVSS (about 3.3 V), the power generation circuit 16 generates thereference power VDO (in FIG. 14, 2.07 V), the voltage of which isobtained by decreasing the voltage of the voltage signal EB with thetransistors Pt11 to Pt15.

When the input voltage signal EB has a voltage (e.g., 6 V) that isgreater than that of the high voltage power supply VDE, the powergeneration circuit 16 generates the reference power VDO (in FIG. 14,3.62 V), the voltage of which is obtained by decreasing the voltage ofthe voltage signal EB with the transistors Pt11 to Pt15.

In this manner, the power generation circuit 16 generates the referencepower VDO at about 3 V even if the voltage signal EB is input when thepower generation circuit 16 is not supplied with power (high voltagepower supply VDE).

A plurality (four in the first embodiment) of transistors Nt9 to Nt12are connected between the node N4 and the low voltage power supply VSS(refer to FIG. 12). Thus, the leakage current flowing through thetransistors Nt9 to Nt12 is small. In this case, the gate voltages at thetransistors Nt9 to Nt12 are respectively 3.3 V, 2.16 V, 1.24 V, and 0.52V, and the leakage current in the path of the transistors Nt9 to Nt12 isreduced to several tens of nanoamperes.

Since the transistor Pt15 is connected to the transistors Pt11 to Pt14in the reverse direction (NP) and is reverse biased, reverse leakagecurrent does not flow through the path of the transistors Pt11 to Pt15.The gates of the transistors Pt11 to Pt15 are connected to a lowervoltage side (source side) when the voltage signal EB decreases voltage.Thus, the transistors Pt11 to Pt15 stably function. In addition tosuppressing device deterioration, which is caused by an increase in theresistance component, and voltage fluctuation of the reference powerVDO, the intended reference power VDO is accurately generated. Further,the power generation circuit 16 has the ESD protection resistor R2.Thus, voltage fluctuation is suppressed even when the voltage of thevoltage signal EB changes drastically.

The reference power VDO generated by the power generation circuit 16 issupplied to the input/output circuit 12, the input circuit 13, and theoutput circuit 14. Thus, regardless of whether the high voltage powersupply VDE is supplied, damage to devices and the occurrence of aleakage current is prevented in the input/output buffer 11 regardless ofthe voltage of the voltage signal EB.

In the power generation circuit 16 of the first embodiment, theprotection circuit 17 may be configured by NMOS transistors Nt13 to Nt17as shown in FIG. 15. More specifically, the transistor Nt13 receives thereference power supply VDO in the reverse direction (NP). The othertransistors Nt14 to Nt17 are connected in a direction that is reversedfrom the connection direction of the transistor Nt13. That is, thetransistors Nt13 to Nt17 are diode-connected to receive the referencevoltage VDO in the manner of NP-PN-PN-PN-PN. In this case, thetransistor Nt13 stops reverse current leakage.

The gates of the transistors Nt13 to Nt17 are each connected to thehigher voltage side (i.e., drain side) when the voltage is decreased.Thus, the transistors Nt13 to Nt17 are stably operated, fluctuation ofthe reference power VDO caused by an increase in the resistancecomponent is suppressed, and the reference power VDO is accuratelygenerated with the intended voltage.

The NMOS transistor protection circuit is more useful than the PMOStransistor protection circuit when laid out on an n-type siliconsubstrate. That is, when PMOS transistors (transistors Pt11 to Pt15) arelaid out on an n-type silicon substrate, a tripe well transistorconfiguration becomes necessary. As the layout area increases, thenumber of reticles and the number of processing operations increase.This increases costs. Accordingly, it is preferred that the protectioncircuit 17 be configured by PMOS transistors (transistors Pt11 to Pt15)when using a p-type silicon substrate and that the protection circuit 17be configured by NMOS transistors (transistors Nt13 to Nt17) when usingan n-type silicon substrate.

The protection circuit 17 may further be configured as shown in FIGS.16A and 16B. In FIG. 16A, the voltages at the back gates of the PMOStransistors Pt11 to Pt15 are each generated from the divisional voltageof the source voltage and the low voltage power supply VSS. Thetransistors Pt11 to Pt15 are diode-connected to receive the referencepower VDO in the manner of NP-NP-NP-NP-NP.

In FIG. 16B, the back gate voltages of the NMOS transistors Nt13 to Nt17are each generated from the divisional voltage of the drain voltage andthe low voltage power supply VSS. Each transistor Nt13 to Nt17 arediode-connected to receive the reference power VDO in the manner ofPN-PN-PN-PN-PN. In the protection circuits of FIGS. 16A and 16B, damageto the device and the occurrence of leakage current caused by the lowback gate voltage is prevented.

The input/output buffer 11 of the first embodiment has the advantagesdescribed below.

(1) The power generation circuit 16 of the input output buffer 11converts the voltage signal EB, which is input from an external device,to a proper voltage corresponding to the high voltage power supply VDEand generates the reference power VDO. The power generation circuit 16includes diode-connected transistors Pt11 to Pt15 (protection circuit17). Further, the back gates of the transistors Pt11 to Pt15 areconnected to a node at which the voltage is one other than that of thehigh voltage power supply VDE and the low voltage power supply VSS.Thus, regardless of whether the high voltage power supply VDE is beingsupplied, when the voltage signal EB is input, high voltage is preventedfrom being applied between the gate and back gate of each of thetransistors Pt11 to Pt15, and deterioration and damage to the transistoris prevented.

(2) Among the transistors Pt11 to Pt15, the transistors Pt11 to Pt14 arediode-connected to receive the reference power VDO in the forward biasdirection (forward direction), and the transistor Pt15 isdiode-connected to receive the reference power VDO in the reverse biasdirection (reverse direction). Thus, when the reference power VDO isgenerated, reverse leakage current is not produced and the referencepower VDO is maintained at the intended voltage.

(3) The gate of each of the transistors Pt11 to Pt15 is connected to theassociated source. When the input voltage signal EB has a voltage thatis greater than the voltage of the high voltage power supply VDE and thevoltage signal EB causes a decrease in voltage, the source voltage isless than the drain voltage. Thus, the increase in the resistance of thetransistors Pt11 to Pt15 prevents voltage fluctuation of the referencepower VDO.

(4) The power generation circuit 16 includes a voltage-maintainingcircuit 18, which is configured by transistors Nt9 to Nt12. The gate ofthe transistor Nt9 is connected to the reference power VDO, and thegates of the transistors Nt10 to Nt12 are connected to the high voltageside terminal (drain). Thus, the leakage current that flows through thetransistors Nt9 to Nt12 is minimized.

FIG. 17 is a circuit diagram illustrating an input/output circuit 22 ofan input/output buffer 11 according to a second embodiment of thepresent invention. The input/output buffer 11 of the second embodimentis used as a game port (joystick port) to which a joystick is connected.The input/output buffer 11 is configured by partially modifying theinput/output circuit 12 and input circuit 13 of the input/output buffer11 in the first embodiment.

The input/output circuit 22 includes two NMOS transistors Nt1 and Nt2and is provided with an open drain output function. This is because theinput/output buffer 11, which is used as a joystick port, detectsposition information of the joystick during a period in which theinput/output buffer 11 is pulled-up to a power supply of +5 V and theinput/output circuit 22 does not require an output having a high level.

FIG. 18A is a circuit diagram illustrating an input circuit 23 of theinput/output buffer 11. The input circuit 23 includes an NMOS transistorNt3, resistors R3 to R5, a comparator CMP, and a reference circuit 23 a.As shown in FIG. 18A, a voltage signal EBR is input to the source of thetransistor Nt3 via the resistor R3. Voltage generated by dividing thereference power VDO with the resistors R4 and R5 is input to the drainof the transistor Nt3. The gate and source of the transistor Nt3 areconnected to each other. The voltage at a node IM between the source ofthe transistor Nt3 and the resistor R3 is input to an inverting inputterminal of the comparator CMP. A reference voltage signal IP from areference circuit 23 a, which is shown in FIG. 18B, is input to anon-inverting terminal of the comparator CMP. The comparator CMPcompares the voltage at the node IM with the voltage of the referencevoltage signal IP and generates a signal X at a low level or a highlevel in accordance with the comparison.

The reference circuit 23 a includes resistors R6 to R8, invertercircuits INV1 and INV2, and transfer gates TG1, TG2. Each of thetransfer gates TG1 and TG2 includes a PMOS transistor and an NMOStransistor. High voltage side divisional voltage generated from powersupply VDE by resistors R6 to R8 is input to the input terminal of thetransfer gate TG1. Low voltage side divisional voltage is input to theinput terminal of the transfer gate TG2.

The PMOS transistor gate of the transfer gate TG1 and the NMOStransistor gate of the transfer gate TG2 are connected to each other,and the signal X is input to each gate from the comparator CMP via aninverter circuit INV1. Further, the signal X is input to the NMOStransistor gate of the transfer gate TG1 and the PMOS transistor gate ofthe transfer gate TG2 via the inverter circuits INV1 and INV2.

The transfer gates TG1, TG2 are activated and inactivated in acomplementary manner in accordance with the signal X in the referencecircuit 23 a. The reference circuit 23 a generates the reference voltagesignal IP having reference voltage REFH when the transfer gate TG1switches on and generates the reference voltage signal IP havingreference voltage REFL when the transfer gate TG2 is activated.

The operation of the input/output buffer 11, which includes the inputcircuit 23, will now be discussed. Normally, in an input/output bufferused as the joystick port, a threshold voltage for recognizing an inputas a high level (threshold voltage VIL) and a threshold voltage forrecognizing an input as a low level (threshold voltage VIL) are both setat about 3.0 V (power supply voltage (high voltage power supply VDE=3.3V)−0.3 V). That is, in the input/output buffer of the joystick port, thevoltage difference between the source and gate of the transistorfunctioning in accordance with the threshold voltage is about 0.3 V andsmall. Thus, the operation of the transistor may be instable.

In the input circuit 23 of the second embodiment, the voltage signal EBRis input to the source of the transistor NT3. Thus, the voltage at nodeIM may be increased to the threshold voltage (about 3.0 V) in accordancewith the voltage level of the voltage signal EB (external input signal).In this state, voltage generated by dividing the reference power VDOwith the resistors R4 and R5 is input to the drain of the transistorNt3. This prevents the voltage at the node IM from exceeding apredetermined value.

The reference circuit 23 a generates the reference voltage signal IPhaving the reference voltage REFH (e.g., 3.1 V) at a timing in which thesignal X shifts from a low level to a high level. Further, the referencecircuit 23 a generates the reference voltage signal IP having thereference voltage REFL (e.g., 3.1 V) at a timing in which the signal Xshifts from a high level to a low level. That is, the reference circuit23 a, which functions as a Schmitt trigger circuit, stabilizes theoutput of the comparator CMP.

Accordingly, the input/output buffer 11 of the second embodimentoperates stably even when the threshold voltage of an input is high(e.g., 3.0 V) and is especially useful for a joystick port that detectsthe position information of the joystick.

FIG. 19 is a schematic block diagram of an input buffer 31 according toa third embodiment of the present invention. FIG. 20 is a schematicblock diagram of an output buffer 41. In the third embodiment, theinput/output buffer 11 (refer to FIG. 8) of the first embodiment is usedto configure either the input buffer or the output buffer.

That is, as shown in FIG. 19, the output circuit 14 is deleted from theinput/output buffer 11 of the first embodiment. When using the inputbuffer 31 as a joystick port, the input/output circuit 22 (FIG. 17) andthe input circuit 23 (FIG. 18) of the second embodiment may be employedin lieu of the input/output circuit 12 and the input circuit 13.Referring to FIG. 20, in the output buffer 41, the input circuit 13 iseliminated from the input/output buffer 11 of the first embodiment.

An input buffer according to a fourth embodiment of the presentinvention will now be discussed with reference to FIGS. 21A to 24B. Inthe fourth embodiment, to reduce power consumption, the input bufferincludes a pull-up resistor for fixing the voltage signal EB (externalinput signal) at a high level or a pull-down resistor for fixing thevoltage signal EB at a low level.

An input buffer 51 incorporating a pull-up resistor will now bediscussed. As shown in FIG. 21A, a control signal PC for electricallydisconnecting the input buffer 51 from a pull-up resistor is normallyinput when testing the input buffer 51. More specifically, as shown inFIG. 21B, an input terminal of the voltage signal EB in the input buffer51 is connected to one end of an input protection resistor R9. The otherend of the resistor R9 is connected to a high voltage power supply VDEvia a pull-up resistor R10 and a PMOS transistor Pt21 (switch device).The control signal PC is input to the gate of the transistor Pt21. Thegate of the transistor Pt21 is connected to a low voltage power supplyVSS (ground) via a pull-down resistor R11, which stabilizes the inputlevel of the control signal PC.

Normally, the control signal PC activates the transistor Pt21 andconnects the power supply VDE to the pull-up resistor R10 in the inputbuffer 51. When conducting a test, the control signal PC inactivates thetransistor Pt21 and disconnects the power supply VDE from the pull-upresistor R10. Thus, leakage current does not flow through the pull-upresistor R10 when conducting a test, and the testing of an internalcircuit of the input buffer is accurately conducted.

When the input buffer 51 enters a fail-safe mode in a state in which thepower supply VDE has 0 V, the voltage signal EB has 5 V, and the controlsignal has 0 V, as shown in FIG. 21C, a voltage difference of 5 V isproduced between the source and drain and drain and gate of thetransistor Pt21. Accordingly, there is a need to prevent the transistorPt21 from being damaged in the fail-safe mode.

FIGS. 22A and 22B are explanatory diagrams illustrating an input buffer51 a that is suitable for the fail-safe mode. As shown in FIG. 22A, thecontrol signal PC is input to the gate of the transistor Pt21 via aninverter circuit 52 and a NAND circuit 53 in the input buffer 51A. Thesource of the transistor Pt21 receives the reference power VDO (refer toFIG. 12).

In the input buffer 51 a, a signal having a high level is input to thegate of the transistor Pt21 (referred to as P-Gate in FIG. 22B) in thefail-safe mode (i.e., when the high voltage power supply VDE has 0 V).More specifically, if the control signal PC is input at a low level (0V) when the power supply VDE has 0 V, a signal having a high level isinput to the gate of the transistor Pt21. Further, if the control signalPC is input at a high level (3.3 V) when the power supply VDE has 0 V, asignal having a high level is input to the gate of the transistor Pt21,as shown in FIG. 22B. In this state, the transistor Pt21 is inactivatedand thus not damaged.

An input buffer incorporating a pull-down resistor will now bediscussed. Referring to FIG. 23A, in an input buffer 61 including apull-down resistor, an input terminal of the voltage signal EB isconnected to one end of an input protection resistor R12. The other endof the resistor R12 is connected to a low voltage power supply VSS via apull-down resistor R13 and an NMOS transistor Nt21 (switch device). Thecontrol signal PC is input to the gate of the transistor Nt21 via aninverter circuit 62. The gate of the transistor Nt21 is connected to alow voltage power supply VSS via a pull-down resistor R14 forstabilizing the input level of the control signal PC.

When the input buffer 61 enters the fail-safe mode, referring to FIG.23B, a voltage difference of 5 V is produced between the source anddrain, the drain and gate, and the drain and back gate of the transistorNt21. Accordingly, there is a need to prevent the transistor Nt21 frombeing damaged in the fail-safe mode.

FIGS. 24A and 24B are explanatory diagrams of an input buffer 61 a thatis suitable for the fail-safe mode. As shown in FIG. 24A, in the inputbuffer 61 a, the control signal PC is input to the gate of thetransistor Nt21 via an inverter circuit 63, a NAND circuit 64, and aninverter circuit 62. The source of the transistor Nt21 is connected tothe selector circuit 65. The selector circuit 65 controls the sourcevoltage of the transistor Nt21 at the voltage of the low voltage powersupply VSS or the voltage signal BP in accordance with whether or notpower VDE is supplied.

In the input buffer 61 a, a signal having a low level is input to thegate of the transistor Nt21 (referred to as N-Gate in FIG. 24B) in thefail-safe mode (i.e., when the high voltage power supply VDE has 0 V).More specifically, if the control signal PC is input at a low level (0V) when the power supply VDE has 0 V, a signal having a low level isinput to the gate of the transistor Nt21. Further, if the control signalPC is input at a high level (3.3 V) when the power supply VDE has 0 V, asignal having a low level is input to the gate of the transistor Nt21.In this state, the transistor Nt21 is inactivated and thus not damaged.

In the fourth embodiment, the devices of the input buffers 51 a, 61 a,which include a pull-up resistor or a pull-down resistor, are preventedfrom being damaged when the input buffers 51 a, 61 a enter the fail-safemode.

It should be apparent to those skilled in the art that the presentinvention may be embodied in many other specific forms without departingfrom the spirit or scope of the invention. Particularly, it should beunderstood that the present invention may be embodied in the followingforms.

Although the first embodiment employs five transistors Pt, any number oftransistors may be used, for example, three, four, six, or at leastfive.

In the first embodiment, the MOS transistors (protection circuit) thatdecrease the voltage of the voltage signal EB may include p-channel MOStransistors and n-channel MOS transistors.

In the first embodiment, the transistor that undergoes reverse bias dueto the reference power VDO is not limited to the transistor Pt15 and maybe another transistor, such as the transistor Pt13 or the transistorPt14. In the protection circuit 17 of FIG. 15, the transistor thatundergoes reverse bias due to the reference power VDO is not limited tothe transistor Nt13 and may be another transistor, such as one of thetransistors Nt14 to Nt17. That is, the transistor that is in the reversedirection relative to the reference power VDO and undergoes reverse biasdue to the reference power VDO is required only to be arranged at aposition where it can stop a reverse current leakage.

In the first embodiment, the number of the n-channel MOS transistors inthe voltage-maintaining circuit 18 is not limited to four and may be anynumber, for example, three, five, or at least two.

The input/output circuit 12 (FIG. 9) of the first embodiment may bereplaced by an input/output circuit 12 a that is illustrated in FIGS.25A and 25B and suitable to a fail-safe mode. In the input/outputcircuit 12 a of FIGS. 25A and 25B, the gate of the transistor Pt1 isconnected to a selector circuit 12 b. The selector circuit 12 b normallyprovides a control signal AP (high level or low level), which isreceived from the output circuit 14 (FIG. 8), to the gate of thetransistor Pt1. When entering the fail-safe mode, the selector circuit12 b supplies the reference power VDO to the gate of the transistor Pt1.The gate of the transistor Pt2 is connected to a selector circuit 12 c.The selector circuit 12 c normally connects the gate of the transistorPt2 to the low voltage power supply VSS. During the fail-safe mode, theselector circuit 12 c supplies the reference power VD0 to the gate ofthe transistor Pt2. Thus, in the input/output circuit 12 a, devices areprevented from being damaged during the fail-safe mode. This protectsthe input/output circuit 12 a.

The present examples and embodiments are to be considered asillustrative and not restrictive, and the invention is not to be limitedto the details given herein, but may be modified within the scope andequivalence of the appended claims.

1. An input/output buffer for receiving an external voltage signal via aresistor and a reference voltage signal, the input/output buffercomprising: an input circuit including an n-channel MOS transistor and acomparator connected to the n-channel MOS transistor, the n-channel MOStransistor including: a source for receiving the external voltage signalvia the resistor; a gate connected to the source; and a drain forreceiving reference power, the voltage of which is divided by adivisional resistor; wherein the comparator compares the externalvoltage signal with the reference voltage signal to determine whetherthe voltage of the external voltage signal is greater than apredetermined threshold voltage from the comparison.
 2. The input/outputbuffer according to claim 1, wherein the input circuit further includesa reference circuit connected to the comparator which is provided with aSchmitt trigger function that varies the threshold voltage in accordancewith the output of the comparator.
 3. The input/output buffer accordingto claim 1, wherein the input/output buffer is for use with a highvoltage power supply and a low voltage power supply, the input/outputbuffer further comprising: a reference power generation circuitconnectable to the high voltage power supply and the low voltage powersupply for converting the voltage of the external voltage signal andgenerating the reference power, wherein the reference power generationcircuit has a protection circuit including a plurality of MOStransistors for decreasing the voltage of the external voltage signal toa predetermined voltage when the input/output buffer receives theexternal voltage signal and is not supplied with the voltage of the highvoltage power supply, each of the MOS transistors having a back gateconnected to a predetermined node at which the voltage is less than thevoltage of the high voltage power supply and greater than the voltage ofthe low voltage power supply.
 4. An input buffer for receiving anexternal voltage signal via a resistor and a reference voltage signal,the input buffer comprising: an input circuit including an n-channel MOStransistor and a comparator connected to the n-channel MOS transistor,the n-channel MOS transistor including: a source for receiving theexternal voltage signal via the resistor; a gate connected to thesource; and a drain for receiving reference power, the voltage of whichis divided by a divisional resistor; wherein the comparator compares theexternal voltage signal with the reference voltage signal to determinewhether the voltage of the external voltage signal is greater than apredetermined threshold voltage from the comparison.